package thread;

import java.util.Random;

public class ThreeThreadTest {
	static Random random=new Random();
	static int count=0; 	
	public static void main(String[] args) {		
		new One().start();
		new Two().start();
		new Three().start();
	}
	static class One extends Thread{
		@Override
		public void run() {
			while(true){
				System.out.print(".");
				ThreeThreadTest.count++;
				if(ThreeThreadTest.count>100) 
					break;
			}
		}
	}
	static class Two extends Thread{
		@Override
		public void run() {
			while(true){
				System.err.print("#");
				ThreeThreadTest.count++;
				if(ThreeThreadTest.count>100) break;
			}
		}
	}
	static class Three extends Thread{
		@Override
		public void run() {
			while(true){
				System.out.print("@");
				ThreeThreadTest.count++;
				if(ThreeThreadTest.count>100) break;
			}
		}
	}
	
}
